/**
 * 
 */
package com.cosc716.simulator;

/**
 * @author davidmessing
 *
 */
public class CommandSeatPatrons implements RunLoopCommand {

	private DataSource datasource;
	
	public CommandSeatPatrons(DataSource datasource) {
		this.datasource = datasource;
	}

	@Override
	public DataSource getDatasource() {
		return datasource;
	}

	@Override
	public void setDatasource(DataSource datasource) {
		if (datasource != null) {
			this.datasource = datasource;
		}
	}

	@Override
	public void execute(int timeInterval) {
		// do stuff with datasource
		this.datasource.seatPatronsForTime(timeInterval);
		//System.out.println("Did seat patrons at time " + timeInterval);
	}

}
